package org.aurora.module.user.api.facade.response;

import org.aurora.framework.boot.common.rpc.response.DataResponse;
import org.aurora.module.user.api.facade.response.data.UserInfo;

import java.io.Serial;

/**
 * UserAuthResponse
 * <pre>
 * description:
 * create date: 2025-03-23 18:07:33
 * </pre>
 *
 * @author cao.yong
 */
public class UserAuthResponse extends DataResponse<UserInfo> {
    @Serial
    private static final long serialVersionUID = 1L;

    public UserAuthResponse(UserInfo data) {
        super(data);
    }

    public UserAuthResponse(boolean isSuccess, int code, String message, UserInfo data) {
        super(isSuccess, code, message, data);
    }

    public static UserAuthResponse success(UserInfo data) {
        return new UserAuthResponse(data);
    }
    public static UserAuthResponse failure(int code, String message) {
        return new UserAuthResponse(false, code, message, null);
    }
}
